package routers

import (
	"xinyuan/copy/controllers"
	"github.com/astaxie/beego"
)

func init() {
	beego.Router("/", &controllers.MainController{})

	ns := beego.NewNamespace("/v1",
		beego.NSRouter("/copy", &controllers.CopyController{}, "get:GetCopy"),
		beego.NSRouter("/copy", &controllers.CopyController{}, "post:PostCopy"),
		beego.NSRouter("/delete", &controllers.CopyController{}, "post:DeleteCopy"),
	)
	beego.AddNamespace(ns)
	beego.Router("/login", &controllers.WebController{}, "get:Login")
	beego.Router("/login", &controllers.WebController{}, "post:Board")
}
